import React from 'react'
import { Row, Col, Steps } from 'antd'
import './Progress.less'

import { progresslist } from './sampleModule/cssData'

const { Step } = Steps;

export default function Progress(props) {
  return (
    <Row className={`progress-box ${props.isTitle? 'is-title': ''}`}>
      <Col span={20} offset={2}>
        <Steps
          current={props.current}
          onChange={props.onChange}>
          {
            progresslist.map(it => (
              <Step { ...it } key={it.title}/>
            ))
          }
        </Steps>
      </Col>
    </Row>
  )
}
